<?php
// Filename: pam/view/pam/ageingpolicy/view.phtml
$title = 'Ageing Policy Indicators';
$this->headTitle($title);
?>

<h1><?php echo $this->escapeHtml($title); ?></h1>

<h3><?php echo $this->escapeHtml($policy->issue_title); ?></h3>
<p><?php echo $this->escapeHtml($policy->description); ?></p>

<p>
    <a href="<?php echo $this->url('ageing-indicators', array('action' => 'add'), TRUE); ?>">Add new ageing policy indicator</a>
</p>

<table class="table">
    <tr>
        <th>Indicator Name</th>
        <th>Base Value</th>
        <th>Change Value</th>
        <th>Date of Value</th>
        <th>Is Triggered</th>
        <th>&nbsp;</th>
    </tr>
    <?php foreach ($indicators as $ind) : ?>
        <tr>
            <td><?php echo $this->escapeHtml($ind->indicator_name); ?></td>
            <td><?php echo $this->escapeHtml($ind->base_value); ?></td>
            <td><?php echo $this->escapeHtml($ind->change_value); ?></td>
            <td><?php echo $this->escapeHtml($ind->value_date); ?></td>
            <td><?php echo ($ind->is_triggered? 'Yes' : 'No'); ?></td>
            <td>
                <a href="<?php echo $this->url('ageing-indicators', array('action' => 'edit', 'ind_id' => $ind->id), true);
        ?>">Edit</a>
                <a href="<?php echo $this->url('ageing-indicators', array('action' => 'delete', 'ind_id' => $ind->id), true);
        ?>">Delete</a>
            </td>
        </tr>
    <?php endforeach; //endif;?>
</table>

